using System;
using System.Collections;
using System.Collections.Specialized;
namespace BMC.ARSystem
{
	internal class DictionaryDataLoader : DataLoader
	{
		private IDictionary _dict;
		public IDictionary Data
		{
			get
			{
				return this._dict;
			}
		}
		public DictionaryDataLoader(string dataFileName) : base(dataFileName)
		{
			base._beginLoadingEH += new BeginLoadingEventHandler(this.OnBeginLoading);
			base._loadDataLineEventEH += new LoadDataLineEventHandler(this.OnLoadDataLine);
			base._afterLoadedEH += new AfterLoadedEventHandler(this.OnAfterLoaded);
			base.Load();
		}
		internal void OnBeginLoading(object sender, BeginLoadingEventArgs e)
		{
			DictionaryDataLoader dictionaryDataLoader = (DictionaryDataLoader)sender;
			dictionaryDataLoader._dict = new HybridDictionary();
		}
		internal void OnLoadDataLine(object sender, LoadDataLineEventArgs e)
		{
			DictionaryDataLoader arg_06_0 = (DictionaryDataLoader)sender;
			ArrayList arrayList = TupleDataLoader.LineParts(e.DataLine);
			this._dict.set_Item((string)arrayList.get_Item(0), arrayList);
		}
		internal void OnAfterLoaded(object sender, AfterLoadedEventArgs e)
		{
			DictionaryDataLoader arg_06_0 = (DictionaryDataLoader)sender;
		}
		private ArrayList LineParts(string str)
		{
			string[] array = str.Split(new char[]
			{
				'|'
			});
			int i = 0;
			int num = array.Length;
			while (i < num)
			{
				array[i] = array[i].Trim();
				i++;
			}
			return new ArrayList(array);
		}
	}
}
